package com.hycc.base;

import java.util.function.Consumer;

public class ConsumerDemo {
    public static void main(String[] args) {
        Consumer<String> consumer = new Consumer<String>() {
            @Override
            public void accept(String str) {
                System.out.println(str);
            }
        };

        consumer.accept("abc");

        Consumer<Integer> consumer1=(num)->{
            System.out.println(num+10);
        };

        consumer1.accept(1);
    }
}
